package sdfi.lee.Entity;

import org.apache.struts2.ServletActionContext;

import sdfi.lee.DAO.ChangeDAO;
import sdfi.lee.Entity.base.BaseChange;



public class Change extends BaseChange {
	private static final long serialVersionUID = 1L;
	private Integer pid;
	private Integer uid;
public Integer getUid() {
		return uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	/*[CONSTRUCTOR MARKER BEGIN]*/
	public Change () {
		super();
	}

	/**
	 * Constructor for primary key
	 */
	public Change (java.lang.Integer id) {
		super(id);
	}
	public String execute()
	{	Integer useid=Integer.valueOf(ServletActionContext.getRequest().getSession().getAttribute("userid").toString());
		this.setUid(useid);
		try
		{
	return new ChangeDAO().addChange(this);
		}
		catch(Exception ee)
		{	
			ee.printStackTrace();
			return "error";
		}
	}
/*[CONSTRUCTOR MARKER END]*/


}